﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using KingsSharp.Core.Data;

namespace CRM.Admin.Contracts.Dto.Customer
{
    /// <summary>
    /// 顾客信息Dto
    /// </summary>
    public class CustomerDto : IAddDto, IEditDto<Guid>
    {
        public Guid Id { get; set; }

        /// <summary>
        ///  顾客名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        ///顾客简称
        /// </summary>
        public string ShortName { get; set; }
        /// <summary>
        /// 与我公司合作状态
        /// </summary>
        public string CooperationState { get; set; }

        /// <summary>
        /// 顾客编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 销售系统编码
        /// </summary>
        public string SaleSysCode { get; set; }

        /// <summary>
        /// 顾客联系地址外键
        /// </summary>
        public Guid? CustomerAddressId { get; set; }

        #region 顾客联系地址
        /// <summary>
        /// 线路开始地址描述
        /// </summary>
        public string AddressDescription { get; set; }

        /// <summary>
        /// 始发省
        /// </summary>
        public string Province { get; set; }

        /// <summary>
        /// 始发市
        /// </summary>
        public string City { get; set; }

        /// <summary>
        /// 始发区
        /// </summary>
        public string Borough { get; set; }
        /// <summary>
        /// 始发省代码
        /// </summary>
        public string ProvinceCode { get; set; }
        /// <summary>
        /// 始发市代码
        /// </summary>
        public string CityCode { get; set; }

        /// <summary>
        /// 始发区代码
        /// </summary>
        public string BoroughCode { get; set; }


        /// <summary>
        /// 省
        /// </summary>
        public string Province1 { get; set; }

        /// <summary>
        /// 市
        /// </summary>
        public string City1 { get; set; }

        /// <summary>
        /// 区
        /// </summary>
        public string Borough1 { get; set; }
        /// <summary>
        /// 省代码
        /// </summary>
        public string ProvinceCode1 { get; set; }
        /// <summary>
        /// 市代码
        /// </summary>
        public string CityCode1 { get; set; }
        /// <summary>
        /// 邮政编码
        /// </summary>
        public string PostCode { get; set; }
        /// <summary>
        /// 区代码
        /// </summary>
        public string BoroughCode1 { get; set; }

        /// <summary>
        /// 地址明细
        /// </summary>
        public string AddressDescription1 { get; set; }
        #endregion

        /// <summary>
        /// 顾客性质集合
        /// </summary>
        public virtual string StrNatures { get; set; }

        /// <summary>
        /// 公司规模/年营业额
        /// </summary>
        public string Scale { get; set; }

        /// <summary>
        /// 联系人集合
        /// </summary>
        public string StrLinkMans { get; set; }


        /// <summary>
        /// 主营业务
        /// </summary>
        public string Business { get; set; }

        /// <summary>
        /// 资信情况
        /// </summary>
        public string CreditInfo { get; set; }

        /// <summary>
        /// 法人代表
        /// </summary>
        public string LegalMan { get; set; }

        /// <summary>
        /// 顾客类别
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// 所属行业
        /// </summary>
        public string Industry { get; set; }

        /// <summary>
        /// 组织机构代码
        /// </summary>
        public string OrganizationCode { get; set; }

        /// <summary>
        /// 组织机构代码图片路径
        /// </summary>
        public string OrganizationImageUrl { get; set; }

        /// <summary>
        /// 税务登记证代码
        /// </summary>
        public string TaxRegistrationCode { get; set; }

        /// <summary>
        /// 税务登记证图片路径
        /// </summary>
        public string TaxRegistrationImageUrl { get; set; }

        /// <summary>
        /// 营业执照
        /// </summary>
        public string LicenseImageUrl { get; set; }

        /// <summary>
        /// 银行资质证明
        /// </summary>
        public string BankLicenseImageUrl { get; set; }

        /// <summary>
        /// 开票信息开户银行
        /// </summary>
        public string TicketBank { get; set; }

        /// <summary>
        /// 开票信息银行账号
        /// </summary>
        public string TicketBankAccount { get; set; }

        /// <summary>
        /// 开票信息附件
        /// </summary>
        public string TicketAttachment { get; set; }

        /// <summary>
        /// 顾客简介
        /// </summary>
        public string Profiles { get; set; }

        /// <summary>
        /// 简介附件
        /// </summary>
        public string ProfilesAttachment { get; set; }

        /// <summary>
        /// 是否关联顾客
        /// </summary>
        public bool Relation { get; set; }

        /// <summary>
        /// 关联顾客ID
        /// </summary>
        public Guid? ParentId { get; set; }

        /// <summary>
        /// 顾客年度协议完成情况
        /// </summary>
        public string AgreementFilishProfiles { get; set; }

        /// <summary>
        /// 信用评价
        /// </summary>
        public string CreditRatings { get; set; }

        /// <summary>
        /// 潜在顾客对攀钢需求以及供货条件
        /// </summary>
        public string Demand { get; set; }

        /// <summary>
        /// 潜在顾客对攀钢需求以及供货条件 附件
        /// </summary>
        public string DemandFilePath { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        //public ICollection<LinkManDto> LinkMans { get; set; }

        //public ICollection<CustomerNatureDto> CustomerNatures { get; set; }

        /// <summary>
        /// 创建人id
        /// </summary>
        public Guid CreateId { get; set; }
        /// <summary>
        /// 创建人登录账号
        /// </summary>
        public string CreateLogCode { get; set; }
        /// <summary>
        /// 创建人名称
        /// </summary>
        public string CreateName { get; set; }
        /// <summary>
        /// 最后修改人id
        /// </summary>
        public Guid LastEditId { get; set; }
        /// <summary>
        /// 最后修改人登录账号
        /// </summary>
        public string LastEditLogCode { get; set; }
        /// <summary>
        /// 最后修改人名称
        /// </summary>
        public string LastEditName { get; set; }
        /// <summary>
        /// 最后修改时间
        /// </summary>
        public DateTime? LastEditTime { get; set; }
    }
    /// <summary>
    /// 顾客简介
    /// </summary>
    public class CustomerProfilesDto : IAddDto, IEditDto<Guid>
    {
        public Guid Id { get; set; }
        /// <summary>
        /// 关联顾客id外键
        /// </summary>
        public Guid CustomerId { get; set; }
        /// <summary>
        /// 顾客简介
        /// </summary>
        public string Profiles { get; set; }

        /// <summary>
        /// 简介附件
        /// </summary>
        public string ProfilesAttachment { get; set; }
        /// <summary>
        /// 简介年份
        /// </summary>
        public int YearProfiles { get; set; }

    }
    /// <summary>
    /// 顾客履历配置
    /// </summary>
    public class ResumeConfigDto : IAddDto, IEditDto<Guid>
    {
        public Guid Id { get; set; }

        /// <summary>
        /// 字段名称
        /// </summary>
        public string FieldKey { get; set; }

        /// <summary>
        /// 类名路径
        /// </summary>
        public string ClassName { get; set; }

        /// <summary>
        /// 是否产生履历
        /// </summary>
        public bool Build { get; set; }
    }
    /// <summary>
    /// 顾客履历
    /// </summary>
    public class CustomerResumeDto : IAddDto, IEditDto<Guid>
    {
        public Guid Id { get; set; }

        /// <summary>
        /// 字段
        /// </summary>
        public string FieldKey { get; set; }
        /// <summary>
        /// 原始值
        /// </summary>
        public string OldValue { get; set; }

        /// <summary>
        /// 新值
        /// </summary>
        public string NewValue { get; set; }

        /// <summary>
        /// 操作用户ID
        /// </summary>
        public Guid UserInfoId { get; set; }
    }
    /// <summary>
    /// 顾客性质
    /// </summary>
    public class NatureCatalogDto : IAddDto, IEditDto<Guid>
    {
        public Guid Id { get; set; }

        /// <summary>
        /// 性质名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 性质基础代码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 是否允许多选
        /// </summary>
        public bool Multi { get; set; }

        /// <summary>
        /// 编辑是是否生产履历
        /// </summary>
        public bool EidtBuildResume { get; set; }

        /// <summary>
        /// 是否必须
        /// </summary>
        public bool Must { get; set; }

        /// <summary>
        /// 值排序，越小排名越靠前
        /// </summary>
        public int Order { get; set; }

        /// <summary>
        /// 上级性质外键
        /// </summary>
        public Guid? ParentId { get; set; }

        public string ParentName { get; set; }
        /// <summary>
        /// 性质描述
        /// </summary>
        public string Description { get; set; }
    }
    /// <summary>
    /// 顾客性质基础子表
    /// </summary>
    public class NatureDto : IAddDto, IEditDto<Guid>
    {
        public Guid Id { get; set; }

        /// <summary>
        /// 顾客性质外键ID
        /// </summary>
        public Guid NatureCatalogId { get; set; }

        public string NatureCatalogName { get; set; }
        /// <summary>
        /// 顾客性质值
        /// </summary>
        public string Value { get; set; }

        /// <summary>
        /// 值排序，越小排名越靠前
        /// </summary>
        public int Order { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
    }
    /// <summary>
    /// 顾客性质
    /// </summary>
    public class CustomerNatureDto : IAddDto, IEditDto<Guid>
    {
        public Guid Id { get; set; }
        /// <summary>
        /// 顾客性质外键
        /// </summary>
        public Guid NatureId { get; set; }

        /// <summary>
        /// 顾客信息外键
        /// </summary>
        public Guid CustomerId { get; set; }

        /// <summary>
        /// 性质名称
        /// </summary>
        public string Value { get; set; }
    }
    /// <summary>
    /// 顾客地址
    /// </summary>
    public class CustomerAddressDto : IAddDto, IEditDto<Guid>
    {
        public Guid Id { get; set; }

    }
    /// <summary>
    /// 顾客联系人
    /// </summary>
    public class LinkManDto : IAddDto, IEditDto<Guid>
    {
        public Guid Id { get; set; }

        /// <summary>
        /// 联系人姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 职务
        /// </summary>
        public string Job { get; set; }

        /// <summary>
        /// 手机
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 座机
        /// </summary>
        public string Tel { get; set; }

        /// <summary>
        /// 传真
        /// </summary>
        public string Fax { get; set; }

        /// <summary>
        /// 电子邮箱
        /// </summary>
        public string Email { get; set; }
        /// <summary>
        /// QQ号
        /// </summary>
        public string QQnumber { get; set; }

        /// <summary>
        /// 联系地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 邮政编码
        /// </summary>
        public string PostCode { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        public int Order { get; set; }

        /// <summary>
        /// 顾客ID
        /// </summary>
        public Guid CustomerId { get; set; }
    }
    /// <summary>
    /// 顾客归属
    /// </summary>
    public class AscriptionDto : IAddDto, IEditDto<Guid>
    {
        public Guid Id { get; set; }

        /// <summary>
        /// 顾客Id
        /// </summary>
        public Guid CustomerId { get; set; }

        /// <summary>
        /// 组织机构
        /// </summary>
        public Guid OrganizationId { get; set; }

        /// <summary>
        /// 组织机构名称
        /// </summary>
        public string OrganizationName { get; set; }

        /// <summary>
        /// 顾客代表
        /// </summary>
        public string DeputyName { get; set; }


        public class TechnologyDto : IAddDto, IEditDto<Guid>
        {
            /// <summary>
            /// 顾客Id
            /// </summary
            public Guid CustomerId { get; set; }
            /// <summary>
            /// 日期
            /// </summary
            public string EquipmentGetDate { get; set; }
            /// <summary>
            /// 用户
            /// </summary
            public string EquipmentGetUser { get; set; }
            public string EquipmentProfiles { get; set; }
            public Guid Id { get; set; }
            public string ProcessFilePath { get; set; }
            public string ProcessGetDate { get; set; }
            public string ProcessUser { get; set; }
            public string Profiles { get; set; }
            public string ProfilesFilePath { get; set; }
        }
    }
}
